
#ifndef __KERNEL_SYSDEV_H__
#define __KERNEL_SYSDEV_H__

#include "common/basictypes.h"

struct sys_device;

struct sysdev_class {
  struct list_head drivers;

  int (*shutdown)(struct sys_device*);
  int (*shutdown)(struct sys_device*, u32 state);
  int (*resume)(struct sys_device*);

  // struct kset kset;
};


extern int sysdev_class_register(struct sysdev_class*);
extern void sysdev_class_unregister(struct sysdev_class*);

struct sysdev_driver {
  struct list_head  entry;
  int (*add)(struct sys_device*);
  int (*remove)(struct sys_device*);
  int (*shutdown)(struct sys_device*);
  int (*suspend)(struct sys_device*);
  int (*resume)(struct sys_device*);
};

extern int sysdev_driver_register(struct sysdev_class*, struct sysdev_driver*);
extern void sysdev_driver_unregister(struct sysdev_class*,
                                     struct sysdev_driver);

#endif // __KERNEL_SYSDEV_H__
